<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>供应商平台</title>
</head>
<body class="tob-wrap">
	<div th:replace="common/top"></div>
	<article class="container container-c21-issuance clearfix">
		<div th:replace="common/left::c_side"></div>
    <section class="content">

        <div class="m-crumb">
            <p><a href="#">招标处理 > </a> <span>招标邀标发布</span></p>
        </div>

        <div class="issuance-select">
            <p>
                <label for="">招标号 : </label>
                <select class="select" name="demandId" id="demandId" onchange="javascript: changeDemand(this)">
                    <option th:each="demand : ${demandList}" th:value="${demand.id}" th:text="${demand.demandNo}">请选择</option>
                </select>
            </p>
        </div>
		
		<div th:each="pipelineItem : ${pipelineItems}">
        <form action="add.html" method="post" id="" name= "myform" th:action="@{/client/updatePipeline(type='demandlist', pipelineItemId=${pipelineItem.id})}" th:method="post">
        <div class="m-table-sell">
            <div class="m-table-cont">
            	<input class="input" type="hidden" name="demandId" th:value="${demandObj.id}" />
            	<!-- <div th:text="${errorMsg}" style="color: red; text-align: center;">  
						            Validation error  
				</div> -->
                <table width="100%" summay="" cellpadding="0" cellspacing="0">
                    <thead>
                    <tr>
                        <th>序号</th>
                        <th class="w150">描述</th>
                        <th>性质</th>
                        <th>数量</th>
                        <th>单位</th>
                        <th class="w230">所属行业</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    
                    <tbody>
                    <tr class="edit-tr-wrap" id="tr00"><!-- 此方法的参数00要和tr的id一样 -->
                        <td></td>
                        <td><input class="input" type="text" placeholder="请输入" th:value="${pipelineItem.bidDescription}" name="bidDescription"/></td>
                        <td><select class="select" name="" id="" onchange="javascript: changeBidType(this)"> 
                        	<option value="zhaobiao" th:if="${pipelineItem.bidType eq 1}" th:selected="selected">招标</option>
                        	<option value="yibiao" th:if="${pipelineItem.bidType eq 3}" th:selected="selected">议标</option>
                        	<option value="shouyu" th:if="${pipelineItem.bidType eq 2}" th:selected="selected">授予</option>
                        	<option value="xunjia" th:if="${pipelineItem.bidType eq 4}" th:selected="selected">询价</option>
                        	</select></td>
                        <td><input class="input" type="text" placeholder="请输入" /></td>
                        <td><select class="select" name="" id="" > 
                        	<option value="">请选择</option>
                        	<option th:each="unit:${unitList}" th:value="${unit.id}" th:text="${unit.unitName}" th:selected="selected">Wireframe</option>
                        	</select>
                        </td>
                        <td>
                            <p>
                            	<select class="select" name="industryId" id="" onchange="changIndustry(this)"> 
                        		<option value="0">请选择</option>
                        		<option  th:each="industry : ${industryList}" th:value="${industry.id}" th:text="${industry.industryName}"
                        		th:if="${#strings.contains(pipelineItem.tPipelineHeader.tCompany.mainBusiness, industry.id)}" th:selected="selected">Wireframe</option>
                        		</select>							   
                            
                               <!--  <label for=""><input type="checkbox" value=""/> IT 设备</label>
                                <label for=""><input type="checkbox" value=""/> 电力设备</label>
                                <label for=""><input type="checkbox" value=""/> 电力设备</label>
                                <label for=""><input type="checkbox" value=""/> IT 设备</label>
                                <label for=""><input type="checkbox" value=""/> 科学技术</label>
                                <label for=""><input type="checkbox" value=""/> 科学技术</label> -->
                            </p>
                        </td> <!-- 此方法的参数00要和tr的id一样 -->
                        <td><a data-trid="tr003" href="javascript:editcell('00',this)"><i class="icon icon-tr-open"></i> 展开编辑</a></td>
                    </tr>
                    <tr id="edtr00" class="edit-tr"><!-- 此方法的参数00要和tr的id一样 -->
                        <td colspan="7">
                            <div class="table-ul-wrap">
                                <ul id="zhaobiao" th:if="${pipelineItem.bidType eq 1}">
                                    <li>
                                        <p>
                                            <label for="">
                                                <span class="span-label"><i class="label-i"></i> 性质 : </span>
                                                <select class="select" name="bidType" id="">
                                                    <option value="1">招标</option>
                                                </select>
                                            </label>
                                            <label for="">
                                                <span class="span-label">投标截止时间 : </span>
                                                <span class="p-calendar">
                                                    <input class="input input-datepicker" type="text" name="bidopentime" th:if="${pipelineItem.bidOpenTime ne null}" th:value="${#dates.format(pipelineItem.bidOpenTime, 'yyyy-MM-dd')}" />
                                                    <i class="icon icon-calendar"></i>
                                                </span>
                                            </label>
                                            <label for="">
                                                <span class="span-label">讲标时间 : </span>
                                                <span class="p-calendar">
                                                    <input class="input input-datepicker" type="text" name="presentationtime" th:if="${pipelineItem.presentationTime ne null}" th:value="${#dates.format(pipelineItem.presentationTime, 'yyyy-MM-dd')}"/>
                                                    <i class="icon icon-calendar"></i>
                                                </span>
                                            </label>
                                            <label for="">
                                                <span class="span-label">联系人 : </span>
                                                <input class="input" type="text" placeholder="请输入" th:value="${pipelineItem.contactUser}" name="contactUser"/>
                                            </label>
                                            <label for="">
                                                <span class="span-label">联系人电话 : </span>
                                                <input class="input" type="text" placeholder="请输入" th:value="*{pipelineItem.contactPhone}" name="contactPhone"/>
                                            </label>
                                            <label for="">
                                                <span class="span-label">联系人邮箱 : </span>
                                                <input class="input" type="text" placeholder="请输入" th:value="*{pipelineItem.contactEmail}" name="contactEmail"/>
                                            </label>
                                        </p>
                                    </li>
                                    
                                </ul>
                                
                                <ul id="yibiao" th:if="${pipelineItem.bidType eq 3}">
                                    <li>
                                        <p>
                                            <label for="">
                                                <span class="span-label"><i class="label-i"></i> 性质 : </span>
                                                <select class="select" name="bidType" id="">
                                                    <option value="3">议标</option>
                                                </select>
                                            </label>
                                            <label for="">
                                                <span class="span-label">建议金额 : </span>
                                                <input class="input" type="text" placeholder="请输入" th:value="${pipelineItem.tPipelineHeader.tPipelinePublics[0].bidPrice}" name="bidPrice"/>
                                            </label>
                                            <label for=""></label>
                                            <label for="">
                                                <span class="span-label">议标公司1 : </span>
                                                <select class="select" name="companyId1" id="companyId1">
                                                    <option th:each="pipelinePublic,pipelinePublicStat : ${pipelineItem.tPipelineHeader.tPipelinePublics}" th:if="${pipelinePublicStat.count eq 1}" th:value="${pipelinePublic.tVendor.tSupplier.id}" th:text="${pipelinePublic.tVendor.tSupplier.companyName}" >请选择</option>
                                                </select>
                                            </label>
                                            <label for="">
                                                <span class="span-label">议标公司2 : </span>
                                                <select class="select" name="companyId2"  id="companyId2">
                                                   <option th:each="pipelinePublic,pipelinePublicStat : ${pipelineItem.tPipelineHeader.tPipelinePublics}" th:if="${pipelinePublicStat.count eq 2}" th:value="${pipelinePublic.tVendor.tSupplier.id}" th:text="${pipelinePublic.tVendor.tSupplier.companyName}" >请选择</option>
                                                </select>
                                            </label>
                                            <label for="">
                                                <span class="span-label">议标公司3 : </span>
                                                <select class="select" name="companyId3"  id="companyId3">
                                                    <option th:each="pipelinePublic,pipelinePublicStat : ${pipelineItem.tPipelineHeader.tPipelinePublics}" th:if="${pipelinePublicStat.count eq 3}" th:value="${pipelinePublic.tVendor.tSupplier.id}" th:text="${pipelinePublic.tVendor.tSupplier.companyName}" >请选择</option>
                                                </select>
                                            </label>
                                           <label for="">
                                                <span class="span-label">联系人 : </span>
                                                <input class="input" type="text" placeholder="请输入" th:value="${pipelineItem.contactUser}" name="contactUser"/>
                                            </label>
                                            <label for="">
                                                <span class="span-label">联系人电话 : </span>
                                                <input class="input" type="text" placeholder="请输入" th:value="*{pipelineItem.contactPhone}" name="contactPhone"/>
                                            </label>
                                            <label for="">
                                                <span class="span-label">联系人邮箱 : </span>
                                                <input class="input" type="text" placeholder="请输入" th:value="*{pipelineItem.contactEmail}" name="contactEmail"/>
                                            </label>
                                        </p>
                                    </li>
                                </ul>
                                
                                <ul id="shouyu" th:if="${pipelineItem.bidType eq 2}">
                                    <li>
                                        <p>
                                            <label for="">
                                                <span class="span-label"><i class="label-i"></i> 性质 : </span>
                                                <select class="select" name="bidType" id="">
                                                    <option value="2">授予</option>
                                                </select>
                                            </label>
                                            <label for="">
                                                <span class="span-label">建议金额 : </span>
                                                <input class="input" type="text" placeholder="请输入" name="bidPrice" th:value="${pipelineItem.tPipelineHeader.tPipelinePublics[0].bidPrice}"/>
                                            </label>
                                            <label for="">
                                                <span class="span-label">授予公司2 : </span>
                                                <select class="select" name="companyId" id="companyId">
                                                    <option th:each="pipelinePublic,pipelinePublicStat : ${pipelineItem.tPipelineHeader.tPipelinePublics}" th:value="${pipelinePublic.tVendor.tSupplier.id}" th:text="${pipelinePublic.tVendor.tSupplier.companyName}" >请选择</option>
                                                </select>
                                            </label>
                                           <label for="">
                                                <span class="span-label">联系人 : </span>
                                                <input class="input" type="text" placeholder="请输入" th:value="${pipelineItem.contactUser}" name="contactUser"/>
                                            </label>
                                            <label for="">
                                                <span class="span-label">联系人电话 : </span>
                                                <input class="input" type="text" placeholder="请输入" th:value="*{pipelineItem.contactPhone}" name="contactPhone"/>
                                            </label>
                                            <label for="">
                                                <span class="span-label">联系人邮箱 : </span>
                                                <input class="input" type="text" placeholder="请输入" th:value="*{pipelineItem.contactEmail}" name="contactEmail"/>
                                            </label>
                                        </p>
                                    </li>
                                </ul>
                                
                                <ul id="xunjia" th:if="${pipelineItem.bidType eq 4}">
                                    <li>
                                        <p>
                                            <label for="">
                                                <span class="span-label"><i class="label-i"></i> 性质 : </span>
                                                <select class="select" name="bidType" id="">
                                                    <option value="4">询价</option>
                                                </select>
                                            </label>
                                            <label for="">
                                                <span class="span-label" style="display: none;">建议金额 : </span>
                                                <input class="input" type="text" placeholder="请输入" style="display: none;"/>
                                            </label>
                                            <label for=""></label>
                                            <label for="">
                                                <span class="span-label">议标公司1 : </span>
                                                <select class="select" name="companyId1" id="companyId1">
                                                   <option th:each="pipelinePublic,pipelinePublicStat : ${pipelineItem.tPipelineHeader.tPipelinePublics}" th:if="${pipelinePublicStat.count eq 1}" th:value="${pipelinePublic.tVendor.tSupplier.id}" th:text="${pipelinePublic.tVendor.tSupplier.companyName}" >请选择</option>
                                                </select>
                                            </label>
                                            <label for="">
                                                <span class="span-label">议标公司2 : </span>
                                                <select class="select" name="companyId2"  id="companyId2">
                                                    <option th:each="pipelinePublic,pipelinePublicStat : ${pipelineItem.tPipelineHeader.tPipelinePublics}" th:if="${pipelinePublicStat.count eq 2}" th:value="${pipelinePublic.tVendor.tSupplier.id}" th:text="${pipelinePublic.tVendor.tSupplier.companyName}" >请选择</option>
                                                </select>
                                            </label>
                                            <label for="">
                                                <span class="span-label">议标公司3 : </span>
                                                <select class="select" name="companyId3"  id="companyId3">
                                                    <option th:each="pipelinePublic,pipelinePublicStat : ${pipelineItem.tPipelineHeader.tPipelinePublics}" th:if="${pipelinePublicStat.count eq 3}" th:value="${pipelinePublic.tVendor.tSupplier.id}" th:text="${pipelinePublic.tVendor.tSupplier.companyName}" >请选择</option>
                                                </select>
                                            </label>
                                            <label for="">
                                                <span class="span-label">联系人 : </span>
                                                <input class="input" type="text" placeholder="请输入" th:value="${pipelineItem.contactUser}" name="contactUser"/>
                                            </label>
                                            <label for="">
                                                <span class="span-label">联系人电话 : </span>
                                                <input class="input" type="text" placeholder="请输入" th:value="*{pipelineItem.contactPhone}" name="contactPhone"/>
                                            </label>
                                            <label for="">
                                                <span class="span-label">联系人邮箱 : </span>
                                                <input class="input" type="text" placeholder="请输入" th:value="*{pipelineItem.contactEmail}" name="contactEmail"/>
                                            </label>
                                        </p>
                                    </li>
                                </ul>
                                
                            </div>
                            <div class="table-upload">
                                <p> <label for="">附件 : </label> <input type="file" name="file1" /></p>
                                <p class="p-indent">&nbsp;&nbsp;&nbsp;<input type="file" name="file3" /> </p>
                                <p class="p-indent">&nbsp;&nbsp;&nbsp;<input type="file" name="file3" /> </p>
                            </div>
                            <div class="btn-bar"><button class="btn btn-cyan btn-small" type="submit">确定修改</button><a href="#" class="btn btn-simple btn-small">取消</a></div>
                        </td>
                    </tr>
                   
                    </tbody>
                    
                </table>
            </div>
        </div>
		</form>
		</div>
		
       <!--  <div class="btn-bar">
            <a class="btn btn-cyan btn-small" href="#">+ 增加</a>
            <a class="btn btn-orange btn-small" href="#">- 删除</a>
        </div> -->

        <br />
        <br />

    </section>
	</article>
</body>
<script th:inline="javascript">
	//<![CDATA[
	      
	      var errorMsg = /*[[${errorMsg}]]*/;
	      if(errorMsg){
	    	  alert(errorMsg);
	      }
          function changeDemand(obj){
        	  var demandId = obj.options[obj.selectedIndex].value;
        	  
        	  	window.location.href = "/client/prePipelinePublic.htm?type=demandlist&demandId=" + demandId;
          }
          
		//]]>
</script>  


<script data-main="../js/page/b1_supplier" src="../lib/requirejs/require.js"></script>
</html>